/*
 * This file is part of ksPlatform
 * 
 * Copyright (c) 2014-2015
 * 
 * This file is dual-licensed under the AGPLv3 (http://www.gnu.org/licenses/agpl-3.0.html) 
 * 
 * If you are unsure which license is appropriate for your use, please contact the sales department
 * at 97041437@qq.com.
 */
package cn.com.ksplatform.modules.system.init;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import cn.com.ksplatform.core.expand.spring.KsInitialized;
import cn.com.ksplatform.modules.system.auth.cachemanager.service.ButtonCacheService;
import cn.com.ksplatform.modules.system.auth.cachemanager.service.DictCacheService;
import cn.com.ksplatform.modules.system.auth.cachemanager.service.MenuCacheService;
import cn.com.ksplatform.modules.system.auth.cachemanager.service.ParamCacheService;
import cn.com.ksplatform.modules.system.auth.cachemanager.service.ResourceCacheService;
import cn.com.ksplatform.modules.system.auth.cachemanager.service.RoleCacheService;
import cn.com.ksplatform.modules.system.auth.loginmanager.service.IgoneService;

@Component("modules.system.init.SystemInit")
public class SystemInit implements KsInitialized{
	
	
	@Autowired
	MenuCacheService menuCacheService;
	
	@Autowired
	ButtonCacheService buttonCacheService;
	
	@Autowired
	RoleCacheService roleCacheService;
	
	@Autowired
	DictCacheService dictCacheService;
	
	@Autowired
	ResourceCacheService resourceCacheService;
	
	@Autowired
	ParamCacheService paramCacheService;
	
	@Autowired
	IgoneService igoneService;
	
	@Override
	public void initialized() {
		//初始化系统忽略后缀名称
		igoneService.initSystemIgones();
		//角色相关
		menuCacheService.init();
		buttonCacheService.init();
		resourceCacheService.init();
		roleCacheService.init();
		
		//权限无关
		dictCacheService.init();
		paramCacheService.init();
	}

}
